Skip to content

ci: add workflow to update design-tokens version#276

Open
rmenner wants to merge 3 commits intomasterfrom
rmenner/ci/update-design-tokens
Open

ci: add workflow to update design-tokens version#276
rmenner wants to merge 3 commits intomasterfrom
rmenner/ci/update-design-tokens

Conversation

@rmenner
Copy link
Contributor

@rmenner rmenner commented Jan 30, 2026

Alaska Airlines Pull Request

Resolves: # (issue, if applicable)

Summary:

This pull request introduces a new GitHub Actions workflow to automate updating the design-tokens package. The workflow allows users to manually trigger updates, specify the type of change, and associate updates with a ticket number. It streamlines the process of keeping design tokens up to date and ensures changes are properly tracked.

New workflow for updating design tokens:

  • Added .github/workflows/update-design-tokens.yml to automate updating the @aurodesignsystem/design-tokens package, including steps for installing dependencies, updating the package, building the project, and creating a pull request with customizable commit messages and titles.

Please delete options that are not relevant.

  • New capability
  • Revision of an existing capability
  • Infrastructure change (automation, etc.)
  • Other (please elaborate)

Checklist:

  • My update follows the CONTRIBUTING guidelines of this project
  • I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.

Thank you for your submission!

-- Auro Design System Team

Summary by Sourcery

CI:

  • Introduce a workflow_dispatch GitHub Actions workflow that updates the @aurodesignsystem/design-tokens dependency, rebuilds the project, and creates a PR with a ticket-linked commit message.

@rmenner rmenner requested a review from a team as a code owner January 30, 2026 20:38
@sourcery-ai
Copy link

sourcery-ai bot commented Jan 30, 2026

Reviewer's Guide

Adds a new GitHub Actions workflow to manually trigger and automate updates of the @aurodesignsystem/design-tokens package, then build the project and open a pull request with standardized metadata.

Sequence diagram for the manual design-tokens update workflow

sequenceDiagram
    actor Maintainer
    participant GitHubActions as GitHubActions_Workflow
    participant Repo as Repository
    participant Node as NodeJS_Environment
    participant Npm as NPM
    participant Ncu as NpmCheckUpdates
    participant PR as GitHub_PullRequests

    Maintainer->>GitHubActions: Trigger workflow_dispatch(ticket-number, change-type)
    GitHubActions->>Node: Setup Node.js using actions_setup-node_v4
    GitHubActions->>Repo: Checkout code using actions_checkout_v4
    GitHubActions->>Npm: Run npm_ci to install dependencies
    GitHubActions->>Ncu: Run npx_npm-check-updates for aurodesignsystem_design-tokens
    Ncu->>Repo: Update package.json and lockfile
    GitHubActions->>Npm: Run npm_run_build
    GitHubActions->>PR: Create pull request using peter-evans_create-pull-request_v5
    PR-->>Maintainer: New PR with standardized commit-message, title, body
Loading

Flow diagram for update-design-tokens GitHub Actions job

flowchart TD
    A["workflow_dispatch triggered
    inputs: ticket-number, change-type"] --> B["Job update-design-tokens starts
    runs-on ubuntu-latest"]
    B --> C["Set permissions
    contents: write
    pull-requests: write"]
    C --> D["Install Node.js
    actions_setup-node_v4"]
    D --> E["Checkout repository
    actions_checkout_v4"]
    E --> F["Install dependencies
    npm ci"]
    F --> G["Update design tokens
    npx npm-check-updates -f @aurodesignsystem/design-tokens -u --install always"]
    G --> H["Build project
    npm run build"]
    H --> I["Create pull request
    peter-evans_create-pull-request_v5
    commit-message uses change-type and ticket-number
    branch: update-tokens with timestamp suffix"]
Loading

File-Level Changes

Change Details Files
Introduce a manual GitHub Actions workflow to update @aurodesignsystem/design-tokens and open a PR.
  • Add workflow_dispatch inputs for ticket number and change type (feat/fix) to parameterize runs.
  • Configure a job with appropriate permissions to run on ubuntu-latest and modify repository contents.
  • Install Node.js, check out the repository, and install dependencies via npm ci.
  • Run npm-check-updates to bump @aurodesignsystem/design-tokens to the latest version and install it.
  • Build the project after updating tokens to validate the change.
  • Create a pull request using peter-evans/create-pull-request with a standardized commit message, title, body, and timestamp-suffixed branch name.
.github/workflows/update-design-tokens.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • In the actions/setup-node@v4 step, consider explicitly specifying a node-version to ensure consistent runtime behavior across runs and avoid surprises when the default version changes.
  • The update design-tokens step currently uses npx npm-check-updates without a fixed version; consider pinning npm-check-updates to a specific major/minor version to avoid workflow breakage from upstream changes.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the `actions/setup-node@v4` step, consider explicitly specifying a `node-version` to ensure consistent runtime behavior across runs and avoid surprises when the default version changes.
- The `update design-tokens` step currently uses `npx npm-check-updates` without a fixed version; consider pinning `npm-check-updates` to a specific major/minor version to avoid workflow breakage from upstream changes.

## Individual Comments

### Comment 1
<location> `.github/workflows/update-design-tokens.yml:29-30` </location>
<code_context>
+      contents: write
+      pull-requests: write
+    steps:
+      - name: Install Node.js
+        uses: actions/setup-node@v4
+      - name: Clone repo
+        uses: actions/checkout@v4
</code_context>

<issue_to_address>
**suggestion:** Specify an explicit Node.js version to avoid future breakages from environment changes

The workflow currently uses the default Node version from `actions/setup-node@v4`. To keep builds reproducible and avoid surprises when GitHub changes that default, set an explicit version via `with: node-version: '18.x'` (or your project’s standard). This also documents the expected runtime for future maintainers.

```suggestion
      - name: Install Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '18.x'
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant